<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
        PromiseState:代表的是promise实例的状态
            -pending:正在进行中(默认值,只有promise的构造函数内部调用了resolve或者reject才能改变)
            -fulfilled:成功状态
            -rejected:失败状态
        PromiseResult:promise实例的值(一般是promise成功或者失败后携带的值)
            -默认值是undefined
            -如果resolve或reject函数中传递了参数,则这个值就是他俩函数中的实参
        */
        const p1 = new Promise((resolve,reject)=>{
            setTimeout(() => {
            console.log('获取了a数据');
            // resolve('ok')
            reject('no')
           }, 3000)
        })
        console.log('p1',p1)
    </script>
</body>
</html>